package com.cdxy.biz.process.impl;

import com.cdxy.biz.process.IScenePostBizProcess;
import com.cdxy.enums.redis.RedisLockGroupEnum;
import com.cdxy.model.dto.base.redis.RedisLockManager;
import com.cdxy.model.dto.req.ScenePostReleaseReq;
import com.cdxy.service.IScenePostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: tangy
 * @Date: 2020/4/1 17:45
 */
@Service
public class ScenePostBizProcessImpl implements IScenePostBizProcess {

    @Autowired
    private IScenePostService scenePostService;

    @Autowired
    private RedisLockManager redisLockManager;

    @Override
    public void scenePostRelease(ScenePostReleaseReq scenePostReleaseReq) {
        String key = scenePostReleaseReq.getAxUid().toString();
        redisLockManager.lock(RedisLockGroupEnum.SCENE_POST_RELEASE, "", 10);
        scenePostService.scenePostRelease(scenePostReleaseReq);
    }
}
